package cn.wolfcode.luowowo.comment.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@Document("scenic_comment")
public class ScenicComment implements Serializable {
    public static final int SCENIC_COMMENT_TYPE_COMMENT = 0; //普通评论
    public static final int SCENIC_COMMENT_TYPE = 1; //评论的评论
    public static final int SCENIC_COMMENT_TYPE2 = 2;

    @Id
    private String id;  //id
    private Long scenicDetailId; //景点id
    private String scenicDetailName;//景点名称
    private Long userId;  //用户id
    private String username; //用户名
    private Integer level;      //用户等级
    private String headUrl;  //用户头像
    private List<Long> thumbuplist=new ArrayList<>();//点赞集合
    private int commentType=SCENIC_COMMENT_TYPE_COMMENT;  //评论类别
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;  //创建时间
    private String comment;  //评论内容
    private Integer rank;       //评分
    private String photos;      //图片
    private ScenicComment refScenicComment;//关联评论
    private String scenicTitle;   //景点标题
    private String refId;
    private List<String> coverImgUrl;
    private List<ScenicComment> scenicComments;
    private int replyNum = 0; //该点评的回复数量
    private int thumbupnum=0;//点赞数
    private String mastScenicId;
    private List<ScenicComment> smallTypeComment;

}
